package com.xzy.learn.spring.lookup.config;

import com.xzy.learn.spring.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;

/**
 * @author xzy.xiao
 * @date 2022/6/6  15:25
 */
public class LookupCollectionConfig {
    @Bean
    public User user1() {
        System.out.println("create user1");
        return new User();
    }

    @Bean
    public User user2() {
        System.out.println("create user2");
        return new User();
    }

    @Bean
    public User user3() {
        System.out.println("create user3");
        return new User();
    }

    @Bean
    @Lazy
    public User user4() {
        System.out.println("create user4（lazy）");
        return new User();
    }
}
